<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            font-family: Arial;
        }
    </style>
</head>
<body>
<script>
    for(var i=1; i<=8; i++){
        for(var k=0; k<8-i; k++){
            document.write("&nbsp");
        }
        for(var j=1; j<=2*i-1; j++){
            document.write("*");
        }
        document.write("<br/>");
    }
</script>
</body>
</html>